3.1.19 \(\int \sqrt {a+b \cos (x)} \tan (x) \, dx\) [19]

Optimal. Leaf size=37 \[ 2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a+b \cos (x)}}{\sqrt {a}}\right )-2 \sqrt {a+b \cos (x)} \]

[Out]

2*arctanh((a+b*cos(x))^(1/2)/a^(1/2))*a^(1/2)-2*(a+b*cos(x))^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {2800, 52, 65, 213} \begin {gather*} 2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a+b \cos (x)}}{\sqrt {a}}\right )-2 \sqrt {a+b \cos (x)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sqrt[a + b*Cos[x]]*Tan[x],x]

[Out]

2*Sqrt[a]*ArcTanh[Sqrt[a + b*Cos[x]]/Sqrt[a]] - 2*Sqrt[a + b*Cos[x]]

Rule 52

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(a + b*x)^(m + 1)*((c + d*x)^n/(b*(
m + n + 1))), x] + Dist[n*((b*c - a*d)/(b*(m + n + 1))), Int[(a + b*x)^m*(c + d*x)^(n - 1), x], x] /; FreeQ[{a
, b, c, d}, x] && NeQ[b*c - a*d, 0] && GtQ[n, 0] && NeQ[m + n + 1, 0] &&  !(IGtQ[m, 0] && ( !IntegerQ[n] || (G
tQ[m, 0] && LtQ[m - n, 0]))) &&  !ILtQ[m + n + 2, 0] && IntLinearQ[a, b, c, d, m, n, x]

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 213

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(-1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])]
, x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 2800

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p_.), x_Symbol] :> Dist[1/f, Subst[I
nt[(x^p*(a + x)^m)/(b^2 - x^2)^((p + 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && NeQ[a^2
 - b^2, 0] && IntegerQ[(p + 1)/2]

Rubi steps

\begin {align*} \int \sqrt {a+b \cos (x)} \tan (x) \, dx &=-\text {Subst}\left (\int \frac {\sqrt {a+x}}{x} \, dx,x,b \cos (x)\right )\\ &=-2 \sqrt {a+b \cos (x)}-a \text {Subst}\left (\int \frac {1}{x \sqrt {a+x}} \, dx,x,b \cos (x)\right )\\ &=-2 \sqrt {a+b \cos (x)}-(2 a) \text {Subst}\left (\int \frac {1}{-a+x^2} \, dx,x,\sqrt {a+b \cos (x)}\right )\\ &=2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a+b \cos (x)}}{\sqrt {a}}\right )-2 \sqrt {a+b \cos (x)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 37, normalized size = 1.00 \begin {gather*} 2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a+b \cos (x)}}{\sqrt {a}}\right )-2 \sqrt {a+b \cos (x)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[a + b*Cos[x]]*Tan[x],x]

[Out]

2*Sqrt[a]*ArcTanh[Sqrt[a + b*Cos[x]]/Sqrt[a]] - 2*Sqrt[a + b*Cos[x]]

________________________________________________________________________________________

Maple [A]
time = 0.09, size = 30, normalized size = 0.81

method result size
derivativedivides \(2 \arctanh \left (\frac {\sqrt {a +b \cos \left (x \right )}}{\sqrt {a}}\right ) \sqrt {a}-2 \sqrt {a +b \cos \left (x \right )}\) \(30\)
default \(2 \arctanh \left (\frac {\sqrt {a +b \cos \left (x \right )}}{\sqrt {a}}\right ) \sqrt {a}-2 \sqrt {a +b \cos \left (x \right )}\) \(30\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*cos(x))^(1/2)*tan(x),x,method=_RETURNVERBOSE)

[Out]

2*arctanh((a+b*cos(x))^(1/2)/a^(1/2))*a^(1/2)-2*(a+b*cos(x))^(1/2)

________________________________________________________________________________________

Maxima [A]
time = 0.50, size = 46, normalized size = 1.24 \begin {gather*} -\sqrt {a} \log \left (\frac {\sqrt {b \cos \left (x\right ) + a} - \sqrt {a}}{\sqrt {b \cos \left (x\right ) + a} + \sqrt {a}}\right ) - 2 \, \sqrt {b \cos \left (x\right ) + a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*cos(x))^(1/2)*tan(x),x, algorithm="maxima")

[Out]

-sqrt(a)*log((sqrt(b*cos(x) + a) - sqrt(a))/(sqrt(b*cos(x) + a) + sqrt(a))) - 2*sqrt(b*cos(x) + a)

________________________________________________________________________________________

Fricas [A]
time = 0.72, size = 109, normalized size = 2.95 \begin {gather*} \left [\frac {1}{2} \, \sqrt {a} \log \left (-\frac {b^{2} \cos \left (x\right )^{2} + 8 \, a b \cos \left (x\right ) + 4 \, {\left (b \cos \left (x\right ) + 2 \, a\right )} \sqrt {b \cos \left (x\right ) + a} \sqrt {a} + 8 \, a^{2}}{\cos \left (x\right )^{2}}\right ) - 2 \, \sqrt {b \cos \left (x\right ) + a}, -\sqrt {-a} \arctan \left (\frac {2 \, \sqrt {b \cos \left (x\right ) + a} \sqrt {-a}}{b \cos \left (x\right ) + 2 \, a}\right ) - 2 \, \sqrt {b \cos \left (x\right ) + a}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*cos(x))^(1/2)*tan(x),x, algorithm="fricas")

[Out]

[1/2*sqrt(a)*log(-(b^2*cos(x)^2 + 8*a*b*cos(x) + 4*(b*cos(x) + 2*a)*sqrt(b*cos(x) + a)*sqrt(a) + 8*a^2)/cos(x)
^2) - 2*sqrt(b*cos(x) + a), -sqrt(-a)*arctan(2*sqrt(b*cos(x) + a)*sqrt(-a)/(b*cos(x) + 2*a)) - 2*sqrt(b*cos(x)
 + a)]

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {a + b \cos {\left (x \right )}} \tan {\left (x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*cos(x))**(1/2)*tan(x),x)

[Out]

Integral(sqrt(a + b*cos(x))*tan(x), x)

________________________________________________________________________________________

Giac [A]
time = 0.55, size = 34, normalized size = 0.92 \begin {gather*} -\frac {2 \, a \arctan \left (\frac {\sqrt {b \cos \left (x\right ) + a}}{\sqrt {-a}}\right )}{\sqrt {-a}} - 2 \, \sqrt {b \cos \left (x\right ) + a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*cos(x))^(1/2)*tan(x),x, algorithm="giac")

[Out]

-2*a*arctan(sqrt(b*cos(x) + a)/sqrt(-a))/sqrt(-a) - 2*sqrt(b*cos(x) + a)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.03 \begin {gather*} \int \mathrm {tan}\left (x\right )\,\sqrt {a+b\,\cos \left (x\right )} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(x)*(a + b*cos(x))^(1/2),x)

[Out]

int(tan(x)*(a + b*cos(x))^(1/2), x)

________________________________________________________________________________________